<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.10"/>
<title>dev: dev::net::TcpWorker Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">dev
   &#160;<span id="projectnumber">0.2</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.10 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('classdev_1_1net_1_1_tcp_worker.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#friends">Friends</a> &#124;
<a href="classdev_1_1net_1_1_tcp_worker-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">dev::net::TcpWorker Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="_tcp_worker_8hpp_source.html">TcpWorker.hpp</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for dev::net::TcpWorker:</div>
<div class="dyncontent">
 <div class="center">
  <img src="classdev_1_1net_1_1_tcp_worker.png" usemap="#dev::net::TcpWorker_map" alt=""/>
  <map id="dev::net::TcpWorker_map" name="dev::net::TcpWorker_map">
<area href="classdev_1_1base_1_1_thread.html" alt="dev::base::Thread" shape="rect" coords="0,56,124,80"/>
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structdev_1_1net_1_1_tcp_worker_1_1_statics.html">Statics</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:acc207baa056ae175bde645fda135c3d8"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="acc207baa056ae175bde645fda135c3d8"></a>
typedef boost::function&lt; void(<a class="el" href="classdev_1_1net_1_1_socket.html">Socket</a> *)&gt;&#160;</td><td class="memItemRight" valign="bottom"><b>PassSocketPointerCB</b></td></tr>
<tr class="separator:acc207baa056ae175bde645fda135c3d8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_types_classdev_1_1base_1_1_thread"><td colspan="2" onclick="javascript:toggleInherit('pub_types_classdev_1_1base_1_1_thread')"><img src="closed.png" alt="-"/>&#160;Public Types inherited from <a class="el" href="classdev_1_1base_1_1_thread.html">dev::base::Thread</a></td></tr>
<tr class="memitem:a9d53e9baeca3f44ab10df09995858f7a inherit pub_types_classdev_1_1base_1_1_thread"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9d53e9baeca3f44ab10df09995858f7a"></a>enum &#160;</td><td class="memItemRight" valign="bottom"><b>Status</b> { <b>NOTREADY</b> = 1, 
<b>READY</b>, 
<b>RUNNING</b>, 
<b>EXIT</b>
 }<tr class="separator:a9d53e9baeca3f44ab10df09995858f7a inherit pub_types_classdev_1_1base_1_1_thread"><td class="memSeparator" colspan="2">&#160;</td></tr>
</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ac8ff72964ca27b1218484530322b2531"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac8ff72964ca27b1218484530322b2531"></a>
virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdev_1_1net_1_1_tcp_worker.html#ac8ff72964ca27b1218484530322b2531">stop</a> (void)</td></tr>
<tr class="memdesc:ac8ff72964ca27b1218484530322b2531"><td class="mdescLeft">&#160;</td><td class="mdescRight">停止线程 <br /></td></tr>
<tr class="separator:ac8ff72964ca27b1218484530322b2531"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac109fdb1e156de25c7d120d7af0c2ab8"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac109fdb1e156de25c7d120d7af0c2ab8"></a>
virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdev_1_1net_1_1_tcp_worker.html#ac109fdb1e156de25c7d120d7af0c2ab8">run</a> (void)</td></tr>
<tr class="memdesc:ac109fdb1e156de25c7d120d7af0c2ab8"><td class="mdescLeft">&#160;</td><td class="mdescRight">线程执行函数(子类重载此函数实现线程要执行的逻辑) <br /></td></tr>
<tr class="separator:ac109fdb1e156de25c7d120d7af0c2ab8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classdev_1_1base_1_1_thread"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classdev_1_1base_1_1_thread')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classdev_1_1base_1_1_thread.html">dev::base::Thread</a></td></tr>
<tr class="memitem:aa1ff0068d8e7ab1c8522827b89937611 inherit pub_methods_classdev_1_1base_1_1_thread"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa1ff0068d8e7ab1c8522827b89937611"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdev_1_1base_1_1_thread.html#aa1ff0068d8e7ab1c8522827b89937611">start</a> (void)</td></tr>
<tr class="memdesc:aa1ff0068d8e7ab1c8522827b89937611 inherit pub_methods_classdev_1_1base_1_1_thread"><td class="mdescLeft">&#160;</td><td class="mdescRight">启动线程，失败会抛出标准异常 <br /></td></tr>
<tr class="separator:aa1ff0068d8e7ab1c8522827b89937611 inherit pub_methods_classdev_1_1base_1_1_thread"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abdbd085206335beee2b372558a158d4d inherit pub_methods_classdev_1_1base_1_1_thread"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="abdbd085206335beee2b372558a158d4d"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdev_1_1base_1_1_thread.html#abdbd085206335beee2b372558a158d4d">exit</a> (void *retval=NULL)</td></tr>
<tr class="memdesc:abdbd085206335beee2b372558a158d4d inherit pub_methods_classdev_1_1base_1_1_thread"><td class="mdescLeft">&#160;</td><td class="mdescRight">线程退出自动调用 <br /></td></tr>
<tr class="separator:abdbd085206335beee2b372558a158d4d inherit pub_methods_classdev_1_1base_1_1_thread"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab982afa8abe62f1883fbd199c6f6ac2c inherit pub_methods_classdev_1_1base_1_1_thread"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab982afa8abe62f1883fbd199c6f6ac2c"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdev_1_1base_1_1_thread.html#ab982afa8abe62f1883fbd199c6f6ac2c">join</a> (void)</td></tr>
<tr class="memdesc:ab982afa8abe62f1883fbd199c6f6ac2c inherit pub_methods_classdev_1_1base_1_1_thread"><td class="mdescLeft">&#160;</td><td class="mdescRight">等待线程退出 <br /></td></tr>
<tr class="separator:ab982afa8abe62f1883fbd199c6f6ac2c inherit pub_methods_classdev_1_1base_1_1_thread"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a99f54dff9a8f27e67ced7476908e5498 inherit pub_methods_classdev_1_1base_1_1_thread"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a99f54dff9a8f27e67ced7476908e5498"></a>
id&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdev_1_1base_1_1_thread.html#a99f54dff9a8f27e67ced7476908e5498">getTid</a> (void) const </td></tr>
<tr class="memdesc:a99f54dff9a8f27e67ced7476908e5498 inherit pub_methods_classdev_1_1base_1_1_thread"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取这个线程的ID <br /></td></tr>
<tr class="separator:a99f54dff9a8f27e67ced7476908e5498 inherit pub_methods_classdev_1_1base_1_1_thread"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a12fcc8a1be64aab3747ced6532a19cc3 inherit pub_methods_classdev_1_1base_1_1_thread"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a12fcc8a1be64aab3747ced6532a19cc3"></a>
Status&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdev_1_1base_1_1_thread.html#a12fcc8a1be64aab3747ced6532a19cc3">getStatus</a> (void) const </td></tr>
<tr class="memdesc:a12fcc8a1be64aab3747ced6532a19cc3 inherit pub_methods_classdev_1_1base_1_1_thread"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取线程状态 <br /></td></tr>
<tr class="separator:a12fcc8a1be64aab3747ced6532a19cc3 inherit pub_methods_classdev_1_1base_1_1_thread"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6131865d8fb573338608d6644a5dc8ee inherit pub_methods_classdev_1_1base_1_1_thread"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdev_1_1base_1_1_thread.html#a6131865d8fb573338608d6644a5dc8ee">setStatus</a> (Status status)</td></tr>
<tr class="memdesc:a6131865d8fb573338608d6644a5dc8ee inherit pub_methods_classdev_1_1base_1_1_thread"><td class="mdescLeft">&#160;</td><td class="mdescRight">设置线程状态  <a href="#a6131865d8fb573338608d6644a5dc8ee">More...</a><br /></td></tr>
<tr class="separator:a6131865d8fb573338608d6644a5dc8ee inherit pub_methods_classdev_1_1base_1_1_thread"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="friends"></a>
Friends</h2></td></tr>
<tr class="memitem:a3ecf3132e8c4bf890c07853cfab7619c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3ecf3132e8c4bf890c07853cfab7619c"></a>
class&#160;</td><td class="memItemRight" valign="bottom"><b>TcpServer</b></td></tr>
<tr class="separator:a3ecf3132e8c4bf890c07853cfab7619c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="inherited"></a>
Additional Inherited Members</h2></td></tr>
<tr class="inherit_header pub_static_methods_classdev_1_1base_1_1_thread"><td colspan="2" onclick="javascript:toggleInherit('pub_static_methods_classdev_1_1base_1_1_thread')"><img src="closed.png" alt="-"/>&#160;Static Public Member Functions inherited from <a class="el" href="classdev_1_1base_1_1_thread.html">dev::base::Thread</a></td></tr>
<tr class="memitem:a8c9a6787ece1b03536a2762920075500 inherit pub_static_methods_classdev_1_1base_1_1_thread"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8c9a6787ece1b03536a2762920075500"></a>
static id&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdev_1_1base_1_1_thread.html#a8c9a6787ece1b03536a2762920075500">currentTid</a> (void)</td></tr>
<tr class="memdesc:a8c9a6787ece1b03536a2762920075500 inherit pub_static_methods_classdev_1_1base_1_1_thread"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取当前执行线程的ID <br /></td></tr>
<tr class="separator:a8c9a6787ece1b03536a2762920075500 inherit pub_static_methods_classdev_1_1base_1_1_thread"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a10a9bbb6c05e52f32fcfe7138198c80a inherit pub_static_methods_classdev_1_1base_1_1_thread"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdev_1_1base_1_1_thread.html#a10a9bbb6c05e52f32fcfe7138198c80a">sleep</a> (int ms)</td></tr>
<tr class="memdesc:a10a9bbb6c05e52f32fcfe7138198c80a inherit pub_static_methods_classdev_1_1base_1_1_thread"><td class="mdescLeft">&#160;</td><td class="mdescRight">线程休眠  <a href="#a10a9bbb6c05e52f32fcfe7138198c80a">More...</a><br /></td></tr>
<tr class="separator:a10a9bbb6c05e52f32fcfe7138198c80a inherit pub_static_methods_classdev_1_1base_1_1_thread"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p><a class="el" href="classdev_1_1net_1_1_tcp_worker.html">TcpWorker</a> </p>
</div><hr/>The documentation for this class was generated from the following files:<ul>
<li>dev/dev/net/<a class="el" href="_tcp_worker_8hpp_source.html">TcpWorker.hpp</a></li>
<li>dev/src/net/TcpWorker.cpp</li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><b>dev</b></li><li class="navelem"><b>net</b></li><li class="navelem"><a class="el" href="classdev_1_1net_1_1_tcp_worker.html">TcpWorker</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.10 </li>
  </ul>
</div>
</body>
</html>
